#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#define ARGS_CHECK(argc, num)               \
    {                                       \
        if (argc != num)                    \
        {                                   \
            fprintf(stderr, args error !n); \
            return -1;                      \
        }                                   \
    }
#define ERROR_CHECK(ret, num, msg) \
    {                              \
        if (ret == num)            \
        {                          \
            perror(msg);           \
            exit(1);               \
        }                          \
    }
void *func1(void *arg){
    char **p = (char**)arg;
    printf("child tid = %ld\n",pthread_self());
    printf("%d\n",*p[0]);
    printf("%c\n",*p[1]);
    printf("%s\n",p[2]);
    pthread_exit((void *)111);
}
int main(int argc, char *argv[])
{
    pthread_t tid1;
    pthread_t tid2;
    char a = 10;
    char b = 'c';
    char *p = "we are aaaaaaaaa";
    char *arr[3] = {&a,&b,p};
    pthread_create(&tid1,NULL,func1,(void *)arr);
    char ret;
   pthread_join(tid1,(void *)&ret);
   //pthread_detach(tid1);
   // printf("ret %d\n",ret);
    return 0;
}
